<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>骰子作业</title>
    <style>
        * {
            /* 清除默认样式 */
            margin: 0;
            padding: 0;
            /* 清除列表前面的小圆点 */
            list-style: none;
        }

        /* 让li元素共行 */
        .box {
            display: flex;
        }

        /* 每个骰子的公共样式 */
        .box li {
            width: 50px;
            height: 50px;
            border: 3px solid black;
            display: flex;
            padding: 4px;
        }

        /* 每个黑点的样式 */
        span {
            width: 10px;
            height: 10px;
            background-color: black;
            border-radius: 50%;
            /* 使其变成原点 */
        }

        /* 选择第一个骰子 */
        .box li:first-of-type {
            justify-content: center;
            align-items: center;
        }

        /* 选择第二个骰子 */
        .box li:nth-of-type(2) {
            flex-direction: column;
            align-items: center;
            justify-content: space-around;
        }

        /* 选择第三个骰子 */
        .box li:nth-of-type(3) {
            justify-content: space-around;
        }

        /* 第三个骰子的第二个黑点 */
        .box li:nth-of-type(3) span:nth-of-type(2) {
            align-self: center;
        }

        /* 第三个骰子的第三个黑点 */
        .box li:nth-of-type(3) span:nth-of-type(3) {
            align-self: flex-end;
        }

        /* 选择第四个筛子 */
        .box li:nth-of-type(4) {
            justify-content: space-between;
        }

        .box li:nth-of-type(4) div {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        /* 选择第五个骰子 */
        .box li:nth-of-type(5) {
            justify-content: space-between;
        }

        .box li:nth-of-type(5) div {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .box li:nth-of-type(5) div:nth-of-type(2) {
            justify-content: center;
        }

        /* 选择第六个骰子 */
        .box li:nth-of-type(6) {
            justify-content: space-between;
        }

        .box li:nth-of-type(6) div {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        /* 选择第七个骰子 */
        .box li:nth-of-type(7) {
            justify-content: space-between;
        }

        .box li:nth-of-type(7) div {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        /* 选择第八个骰子 */
        .box li:nth-of-type(8) {
            justify-content: space-between;
        }

        .box li:nth-of-type(8) div {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
    </style>
</head>

<body>
    <ul class="box">
        <li><span></span></li>
        <!-- 第一个骰子 -->
        <li><span></span>
            <span></span>
        </li>
        <!-- 第二个骰子 -->
        <li><span></span>
            <span></span>
            <span></span>
        </li>
        <!-- 第三个骰子 -->
        <li>
            <div><span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
            </div>
        </li>
        <!-- 第四个骰子 -->
        <li>
            <div><span></span>
                <span></span>
            </div>
            <div><span></span></div>
            <div><span></span>
                <span></span>
            </div>
        </li>
        <!-- 第五个骰子 -->
        <li>
            <div><span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
            </div>
        </li>
        <!-- 第六个骰子 -->
        <li>
            <div><span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
            </div>
        </li>
        <!-- 第七个骰子 -->
        <li>
            <div><span></span>
                <span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
            </div>
            <div><span></span>
                <span></span>
                <span></span>
            </div>
        </li>
        <!-- 第八个骰子 -->
    </ul>
</body>

</html>